import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/manager/activity/page',
    method: 'post',
    data: params
  })
}

export function toggleId(id) {
  return request({
    url: `/manager/activity/toggle/${id}`,
    method: 'post'
  })
}

export function getAreaList() {
  return request({
    url: '/manager/area/areaCascadeSupply',
    method: 'post'
  })
}

export function getVersions(params) {
  return request({
    url: '/manager/activity/versions',
    method: 'post'
  })
}

export function getId(id) {
  return request({
    url: `/manager/activity/single/info/${id}`,
    method: 'post',
    data: id
  })
}

export function delId(id) {
  return request({
    url: '/manager/activity/removes',
    method: 'post',
    data: [id]
  })
}

export function delIds(params) {
  return request({
    url: '/manager/activity/removes',
    method: 'post',
    data: params
  })
}

export function update(params) {
  return request({
    url: '/manager/activity/single/saveOredit',
    method: 'post',
    data: params
  })
}

export function add(params) {
  return request({
    url: '/manager/activity/single/saveOredit',
    method: 'post',
    data: params
  })
}

